package com.levi.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author shentong
 * @since 2022/3/22 9:14 PM
 */
@ApiModel("用户实体类")
@Data
@TableName("mall_user")
public class User extends BaseEntity{

    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("用户名")
    @TableField("username")
    private String username;

    @ApiModelProperty("密码")
    @TableField("password")
    private String password;

    @ApiModelProperty("邮箱")
    @TableField("email")
    private String email;

    @ApiModelProperty("手机号")
    @TableField("phone")
    private String phone;

    @ApiModelProperty("找回密码问题")
    @TableField("question")
    private String question;

    @ApiModelProperty("找回密码答案")
    @TableField("answer")
    private String answer;

    @ApiModelProperty("用户角色，0-管理员，1-普通用户")
    @TableField("role")
    private Integer role;


}
